<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2016/6/7
  Time: 7:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="/wechat/ucenter/recharge.css">
    <jsp:include page="../public/head.jsp" flush="true" />
</head>
<body>
<header >
    <div class="h-cont">
        <div class="h-l"><i class="iconfont icon-person" onclick="history.go(-1)">&#xe625;</i></div>
        <div class="h-r"><span>${title}</span></div>
        <div class="h-t"><a href="/ucenter/rechargeRecord.do"><span>记录</span></a></div>
    </div>
</header>
<div class="h-ocupie"></div>
<section>
    <div class="my_recharge">
        <div class="tip">
            <a onclick="return window.location.replace('/ucenter/recharge.do')"><div class="tip3 ">普通充值</div></a>
            <div class="tip4 current">充值卡充值</div>
        </div>

        <form id="form">
            <div class="cont">
                <span>卡号:</span>
                <input type="text" class="txt" name="card" placeholder="请输入16位卡号">
                <input type="hidden" class="txt" name="accountId" value="${userinfo.id}">
            </div>
            <div class="cont">
                <span>密码:</span>
                <input type="text" class="txt" name="password" placeholder="请输入密码">
            </div>

            <input type="button" name="" value="立即充值" class="recharge_btn" onclick="recharge()" >
        </form>
    </div>
</section>

<script>
    function recharge() {
        $.post("/mobile/prepaid?action=prepaid",$("#form").serialize(),function (data) {
            if (!data.success){
//                tip("",,true);
                alert(data.msg);
            }else {
                window.location.replace("/ucenter/index.do");
            }
        },"json");
    }
</script>
<footer>
    <div  class="my_ocupie"></div>
</footer>
</body>
</html>
